package com.aterrizar.dominio.neo.servicios;

import org.neo4j.cypher.ExecutionEngine;
import org.neo4j.kernel.impl.util.StringLogger;

import com.aterrizar.dominio.Neo4J.ManagerNeo;
import com.aterrizar.dominio.Neo4J.NeoOperation;

public class LimpiarBD implements NeoOperation<Boolean> {
	
    @Override
    public Boolean execute() {
        ExecutionEngine engine = new ExecutionEngine(ManagerNeo.getSession(), StringLogger.SYSTEM);
        engine.execute("MATCH (n)OPTIONAL MATCH (n)-[r]-() DELETE n,r");
        return true;
	    }
	    
}
